home *** CD-ROM | disk | FTP | other *** search
/ Amiga Developer CD 2.1 / Amiga Developer CD v2.1.iso / NDK / NDK_3.5 / Examples / Printer / HP_DeskJet_CMYK / utility.asm < prev   
Encoding:
Assembly Source File  |  1999-10-30  |  2.5 KB  |  93 lines

  1. *
  2. * $Id: utility.asm 44.2 1999/09/13 16:02:18 olsen Exp olsen $
  3. *
  4. * :ts=8
  5. *
  6. *
  7. * COPYRIGHT:
  8. *
  9. *   Unless otherwise noted, all files are Copyright (c) 1999 Amiga, Inc.
  10. *   All rights reserved.
  11. *
  12. * DISCLAIMER:
  13. *
  14. *   This software is provided "as is". No representations or warranties
  15. *   are made with respect to the accuracy, reliability, performance,
  16. *   currentness, or operation of this software, and all use is at your
  17. *   own risk. Neither Amiga nor the authors assume any responsibility
  18. *   or liability whatsoever with respect to your use of this software.
  19. *
  20.  
  21.  
  22.     section    text,code
  23.  
  24.     include    "exec/macros.i"
  25.  
  26. *******************************************************************************
  27.  
  28.     xref    _UtilityBase
  29.  
  30. *******************************************************************************
  31. *
  32. * __CXD33 replacement that uses utility.library
  33. *
  34. *******************************************************************************
  35.  
  36.     xdef    __CXD33            ; Signed divide
  37.  
  38. __CXD33:
  39.     move.l    a6,-(sp)        ; Save your base pointer
  40.     move.l    _UtilityBase(a4),a6    ; Get utility base pointer
  41.     JSRLIB    SDivMod32        ; Do the divide
  42.     move.l    (sp)+,a6        ; Restore a6
  43.     rts                ; And we are done.
  44.  
  45. *******************************************************************************
  46. *
  47. * __CXD22 replacement that uses utility.library
  48. *
  49. *******************************************************************************
  50.  
  51.     xdef    __CXD22            ; Unsigned divide
  52.  
  53. __CXD22:
  54.     move.l    a6,-(sp)        ; Save your base pointer
  55.     move.l    _UtilityBase(a4),a6    ; Get utility base pointer
  56.     JSRLIB    UDivMod32        ; Do the divide
  57.     move.l    (sp)+,a6        ; Restore a6
  58.     rts                ; And we are done.
  59.  
  60. *******************************************************************************
  61. *
  62. * __CXM33 replacement that uses utility.library
  63. *
  64. *******************************************************************************
  65.  
  66.     xdef    __CXM33            ; Signed multiply
  67.  
  68. __CXM33:
  69.     move.l    a6,-(sp)        ; Save your base pointer
  70.     move.l    _UtilityBase(a4),a6    ; Get utility base pointer
  71.     JSRLIB    SMult32            ; Do the multiply
  72.     move.l    (sp)+,a6        ; Restore a6
  73.     rts                ; And we are done.
  74.  
  75. *******************************************************************************
  76. *
  77. * __CXM22 replacement that uses utility.library
  78. *
  79. *******************************************************************************
  80.  
  81.     xdef    __CXM22            ; Unsigned multiply
  82.  
  83. __CXM22:
  84.     move.l    a6,-(sp)        ; Save your base pointer
  85.     move.l    _UtilityBase(a4),a6    ; Get utility base pointer
  86.     JSRLIB    UMult32            ; Do the multply
  87.     move.l    (sp)+,a6        ; Restore a6
  88.     rts                ; And we are done.
  89.  
  90. *******************************************************************************
  91.  
  92.     end
  93.